import java.util.Scanner;

public class l2 {
    public static void main(String[] args){
        Scanner reader = new Scanner(System.in);
        System.out.println("请输入用户名");
        String a = reader.next();
        while (true) {
            System.out.println("请输入密码（可以为字母或汉字）");
            String b = reader.next();
            System.out.println("请再次输入密码（与第一次相同）");
            String c = reader.next();
            if (b.equals(c)) {
                System.out.println("恭喜你，注册成功");
                break;
            } else {
                System.out.println("对不起，您两次输入的密码不一致，请重新输入");
            }
        }
    }
}
